3.17 \(\int \frac{(d+e x)^2 (a+b \log (c x^n))}{x^5} \, dx\)

Optimal. Leaf size=95 \[ -\frac{d^2 \left (a+b \log \left (c x^n\right )\right )}{4 x^4}-\frac{2 d e \left (a+b \log \left (c x^n\right )\right )}{3 x^3}-\frac{e^2 \left (a+b \log \left (c x^n\right )\right )}{2 x^2}-\frac{b d^2 n}{16 x^4}-\frac{2 b d e n}{9 x^3}-\frac{b e^2 n}{4 x^2} \]

[Out]

-(b*d^2*n)/(16*x^4) - (2*b*d*e*n)/(9*x^3) - (b*e^2*n)/(4*x^2) - (d^2*(a + b*Log[c*x^n]))/(4*x^4) - (2*d*e*(a +
 b*Log[c*x^n]))/(3*x^3) - (e^2*(a + b*Log[c*x^n]))/(2*x^2)

________________________________________________________________________________________

Rubi [A]  time = 0.0762334, antiderivative size = 74, normalized size of antiderivative = 0.78, number of steps used = 4, number of rules used = 4, integrand size = 21, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.19, Rules used = {43, 2334, 12, 14} \[ -\frac{1}{12} \left (\frac{3 d^2}{x^4}+\frac{8 d e}{x^3}+\frac{6 e^2}{x^2}\right ) \left (a+b \log \left (c x^n\right )\right )-\frac{b d^2 n}{16 x^4}-\frac{2 b d e n}{9 x^3}-\frac{b e^2 n}{4 x^2} \]

Antiderivative was successfully verified.

[In]

Int[((d + e*x)^2*(a + b*Log[c*x^n]))/x^5,x]

[Out]

-(b*d^2*n)/(16*x^4) - (2*b*d*e*n)/(9*x^3) - (b*e^2*n)/(4*x^2) - (((3*d^2)/x^4 + (8*d*e)/x^3 + (6*e^2)/x^2)*(a
+ b*Log[c*x^n]))/12

Rule 43

Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*x)^m*(c + d
*x)^n, x], x] /; FreeQ[{a, b, c, d, n}, x] && NeQ[b*c - a*d, 0] && IGtQ[m, 0] && ( !IntegerQ[n] || (EqQ[c, 0]
&& LeQ[7*m + 4*n + 4, 0]) || LtQ[9*m + 5*(n + 1), 0] || GtQ[m + n + 2, 0])

Rule 2334

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))*(x_)^(m_.)*((d_) + (e_.)*(x_)^(r_.))^(q_.), x_Symbol] :> With[{u = I
ntHide[x^m*(d + e*x^r)^q, x]}, Simp[u*(a + b*Log[c*x^n]), x] - Dist[b*n, Int[SimplifyIntegrand[u/x, x], x], x]
] /; FreeQ[{a, b, c, d, e, n, r}, x] && IGtQ[q, 0] && IntegerQ[m] &&  !(EqQ[q, 1] && EqQ[m, -1])

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, x]]

Rule 14

Int[(u_)*((c_.)*(x_))^(m_.), x_Symbol] :> Int[ExpandIntegrand[(c*x)^m*u, x], x] /; FreeQ[{c, m}, x] && SumQ[u]
 &&  !LinearQ[u, x] &&  !MatchQ[u, (a_) + (b_.)*(v_) /; FreeQ[{a, b}, x] && InverseFunctionQ[v]]

Rubi steps

\begin{align*} \int \frac{(d+e x)^2 \left (a+b \log \left (c x^n\right )\right )}{x^5} \, dx &=-\frac{1}{12} \left (\frac{3 d^2}{x^4}+\frac{8 d e}{x^3}+\frac{6 e^2}{x^2}\right ) \left (a+b \log \left (c x^n\right )\right )-(b n) \int \frac{-3 d^2-8 d e x-6 e^2 x^2}{12 x^5} \, dx\\ &=-\frac{1}{12} \left (\frac{3 d^2}{x^4}+\frac{8 d e}{x^3}+\frac{6 e^2}{x^2}\right ) \left (a+b \log \left (c x^n\right )\right )-\frac{1}{12} (b n) \int \frac{-3 d^2-8 d e x-6 e^2 x^2}{x^5} \, dx\\ &=-\frac{1}{12} \left (\frac{3 d^2}{x^4}+\frac{8 d e}{x^3}+\frac{6 e^2}{x^2}\right ) \left (a+b \log \left (c x^n\right )\right )-\frac{1}{12} (b n) \int \left (-\frac{3 d^2}{x^5}-\frac{8 d e}{x^4}-\frac{6 e^2}{x^3}\right ) \, dx\\ &=-\frac{b d^2 n}{16 x^4}-\frac{2 b d e n}{9 x^3}-\frac{b e^2 n}{4 x^2}-\frac{1}{12} \left (\frac{3 d^2}{x^4}+\frac{8 d e}{x^3}+\frac{6 e^2}{x^2}\right ) \left (a+b \log \left (c x^n\right )\right )\\ \end{align*}

Mathematica [A]  time = 0.038227, size = 80, normalized size = 0.84 \[ -\frac{12 a \left (3 d^2+8 d e x+6 e^2 x^2\right )+12 b \left (3 d^2+8 d e x+6 e^2 x^2\right ) \log \left (c x^n\right )+b n \left (9 d^2+32 d e x+36 e^2 x^2\right )}{144 x^4} \]

Antiderivative was successfully verified.

[In]

Integrate[((d + e*x)^2*(a + b*Log[c*x^n]))/x^5,x]

[Out]

-(12*a*(3*d^2 + 8*d*e*x + 6*e^2*x^2) + b*n*(9*d^2 + 32*d*e*x + 36*e^2*x^2) + 12*b*(3*d^2 + 8*d*e*x + 6*e^2*x^2
)*Log[c*x^n])/(144*x^4)

________________________________________________________________________________________

Maple [C]  time = 0.122, size = 403, normalized size = 4.2 \begin{align*} -{\frac{b \left ( 6\,{e}^{2}{x}^{2}+8\,dex+3\,{d}^{2} \right ) \ln \left ({x}^{n} \right ) }{12\,{x}^{4}}}-{\frac{48\,i\pi \,bdex{\it csgn} \left ( i{x}^{n} \right ) \left ({\it csgn} \left ( ic{x}^{n} \right ) \right ) ^{2}-18\,i\pi \,b{d}^{2} \left ({\it csgn} \left ( ic{x}^{n} \right ) \right ) ^{3}+18\,i\pi \,b{d}^{2} \left ({\it csgn} \left ( ic{x}^{n} \right ) \right ) ^{2}{\it csgn} \left ( ic \right ) +18\,i\pi \,b{d}^{2}{\it csgn} \left ( i{x}^{n} \right ) \left ({\it csgn} \left ( ic{x}^{n} \right ) \right ) ^{2}+72\,\ln \left ( c \right ) b{e}^{2}{x}^{2}+36\,b{e}^{2}n{x}^{2}+72\,a{e}^{2}{x}^{2}-48\,i\pi \,bdex \left ({\it csgn} \left ( ic{x}^{n} \right ) \right ) ^{3}+36\,i\pi \,b{e}^{2}{x}^{2}{\it csgn} \left ( i{x}^{n} \right ) \left ({\it csgn} \left ( ic{x}^{n} \right ) \right ) ^{2}-48\,i\pi \,bdex{\it csgn} \left ( i{x}^{n} \right ){\it csgn} \left ( ic{x}^{n} \right ){\it csgn} \left ( ic \right ) -36\,i\pi \,b{e}^{2}{x}^{2}{\it csgn} \left ( i{x}^{n} \right ){\it csgn} \left ( ic{x}^{n} \right ){\it csgn} \left ( ic \right ) +96\,\ln \left ( c \right ) bdex+32\,bdenx+96\,adex+36\,i\pi \,b{e}^{2}{x}^{2} \left ({\it csgn} \left ( ic{x}^{n} \right ) \right ) ^{2}{\it csgn} \left ( ic \right ) +48\,i\pi \,bdex \left ({\it csgn} \left ( ic{x}^{n} \right ) \right ) ^{2}{\it csgn} \left ( ic \right ) -36\,i\pi \,b{e}^{2}{x}^{2} \left ({\it csgn} \left ( ic{x}^{n} \right ) \right ) ^{3}-18\,i\pi \,b{d}^{2}{\it csgn} \left ( i{x}^{n} \right ){\it csgn} \left ( ic{x}^{n} \right ){\it csgn} \left ( ic \right ) +36\,\ln \left ( c \right ) b{d}^{2}+9\,b{d}^{2}n+36\,a{d}^{2}}{144\,{x}^{4}}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((e*x+d)^2*(a+b*ln(c*x^n))/x^5,x)

[Out]

-1/12*b*(6*e^2*x^2+8*d*e*x+3*d^2)/x^4*ln(x^n)-1/144*(48*I*Pi*b*d*e*x*csgn(I*x^n)*csgn(I*c*x^n)^2-18*I*Pi*b*d^2
*csgn(I*c*x^n)^3+18*I*Pi*b*d^2*csgn(I*c*x^n)^2*csgn(I*c)+18*I*Pi*b*d^2*csgn(I*x^n)*csgn(I*c*x^n)^2+72*ln(c)*b*
e^2*x^2+36*b*e^2*n*x^2+72*a*e^2*x^2-48*I*Pi*b*d*e*x*csgn(I*c*x^n)^3+36*I*Pi*b*e^2*x^2*csgn(I*x^n)*csgn(I*c*x^n
)^2-48*I*Pi*b*d*e*x*csgn(I*x^n)*csgn(I*c*x^n)*csgn(I*c)-36*I*Pi*b*e^2*x^2*csgn(I*x^n)*csgn(I*c*x^n)*csgn(I*c)+
96*ln(c)*b*d*e*x+32*b*d*e*n*x+96*a*d*e*x+36*I*Pi*b*e^2*x^2*csgn(I*c*x^n)^2*csgn(I*c)+48*I*Pi*b*d*e*x*csgn(I*c*
x^n)^2*csgn(I*c)-36*I*Pi*b*e^2*x^2*csgn(I*c*x^n)^3-18*I*Pi*b*d^2*csgn(I*x^n)*csgn(I*c*x^n)*csgn(I*c)+36*ln(c)*
b*d^2+9*b*d^2*n+36*a*d^2)/x^4

________________________________________________________________________________________

Maxima [A]  time = 1.08416, size = 135, normalized size = 1.42 \begin{align*} -\frac{b e^{2} n}{4 \, x^{2}} - \frac{b e^{2} \log \left (c x^{n}\right )}{2 \, x^{2}} - \frac{2 \, b d e n}{9 \, x^{3}} - \frac{a e^{2}}{2 \, x^{2}} - \frac{2 \, b d e \log \left (c x^{n}\right )}{3 \, x^{3}} - \frac{b d^{2} n}{16 \, x^{4}} - \frac{2 \, a d e}{3 \, x^{3}} - \frac{b d^{2} \log \left (c x^{n}\right )}{4 \, x^{4}} - \frac{a d^{2}}{4 \, x^{4}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x+d)^2*(a+b*log(c*x^n))/x^5,x, algorithm="maxima")

[Out]

-1/4*b*e^2*n/x^2 - 1/2*b*e^2*log(c*x^n)/x^2 - 2/9*b*d*e*n/x^3 - 1/2*a*e^2/x^2 - 2/3*b*d*e*log(c*x^n)/x^3 - 1/1
6*b*d^2*n/x^4 - 2/3*a*d*e/x^3 - 1/4*b*d^2*log(c*x^n)/x^4 - 1/4*a*d^2/x^4

________________________________________________________________________________________

Fricas [A]  time = 1.00472, size = 261, normalized size = 2.75 \begin{align*} -\frac{9 \, b d^{2} n + 36 \, a d^{2} + 36 \,{\left (b e^{2} n + 2 \, a e^{2}\right )} x^{2} + 32 \,{\left (b d e n + 3 \, a d e\right )} x + 12 \,{\left (6 \, b e^{2} x^{2} + 8 \, b d e x + 3 \, b d^{2}\right )} \log \left (c\right ) + 12 \,{\left (6 \, b e^{2} n x^{2} + 8 \, b d e n x + 3 \, b d^{2} n\right )} \log \left (x\right )}{144 \, x^{4}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x+d)^2*(a+b*log(c*x^n))/x^5,x, algorithm="fricas")

[Out]

-1/144*(9*b*d^2*n + 36*a*d^2 + 36*(b*e^2*n + 2*a*e^2)*x^2 + 32*(b*d*e*n + 3*a*d*e)*x + 12*(6*b*e^2*x^2 + 8*b*d
*e*x + 3*b*d^2)*log(c) + 12*(6*b*e^2*n*x^2 + 8*b*d*e*n*x + 3*b*d^2*n)*log(x))/x^4

________________________________________________________________________________________

Sympy [A]  time = 3.94306, size = 160, normalized size = 1.68 \begin{align*} - \frac{a d^{2}}{4 x^{4}} - \frac{2 a d e}{3 x^{3}} - \frac{a e^{2}}{2 x^{2}} - \frac{b d^{2} n \log{\left (x \right )}}{4 x^{4}} - \frac{b d^{2} n}{16 x^{4}} - \frac{b d^{2} \log{\left (c \right )}}{4 x^{4}} - \frac{2 b d e n \log{\left (x \right )}}{3 x^{3}} - \frac{2 b d e n}{9 x^{3}} - \frac{2 b d e \log{\left (c \right )}}{3 x^{3}} - \frac{b e^{2} n \log{\left (x \right )}}{2 x^{2}} - \frac{b e^{2} n}{4 x^{2}} - \frac{b e^{2} \log{\left (c \right )}}{2 x^{2}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x+d)**2*(a+b*ln(c*x**n))/x**5,x)

[Out]

-a*d**2/(4*x**4) - 2*a*d*e/(3*x**3) - a*e**2/(2*x**2) - b*d**2*n*log(x)/(4*x**4) - b*d**2*n/(16*x**4) - b*d**2
*log(c)/(4*x**4) - 2*b*d*e*n*log(x)/(3*x**3) - 2*b*d*e*n/(9*x**3) - 2*b*d*e*log(c)/(3*x**3) - b*e**2*n*log(x)/
(2*x**2) - b*e**2*n/(4*x**2) - b*e**2*log(c)/(2*x**2)

________________________________________________________________________________________

Giac [A]  time = 1.489, size = 146, normalized size = 1.54 \begin{align*} -\frac{72 \, b n x^{2} e^{2} \log \left (x\right ) + 96 \, b d n x e \log \left (x\right ) + 36 \, b n x^{2} e^{2} + 32 \, b d n x e + 72 \, b x^{2} e^{2} \log \left (c\right ) + 96 \, b d x e \log \left (c\right ) + 36 \, b d^{2} n \log \left (x\right ) + 9 \, b d^{2} n + 72 \, a x^{2} e^{2} + 96 \, a d x e + 36 \, b d^{2} \log \left (c\right ) + 36 \, a d^{2}}{144 \, x^{4}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x+d)^2*(a+b*log(c*x^n))/x^5,x, algorithm="giac")

[Out]

-1/144*(72*b*n*x^2*e^2*log(x) + 96*b*d*n*x*e*log(x) + 36*b*n*x^2*e^2 + 32*b*d*n*x*e + 72*b*x^2*e^2*log(c) + 96
*b*d*x*e*log(c) + 36*b*d^2*n*log(x) + 9*b*d^2*n + 72*a*x^2*e^2 + 96*a*d*x*e + 36*b*d^2*log(c) + 36*a*d^2)/x^4